<script src="<?php echo base_url() ?>commons/validacion/js/jquery-1.8.2.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="<? echo base_url() ?>commons/jquery/themes/base/jquery.ui.all.css">
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.core.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.widget.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.tabs.js"></script>
<link rel="stylesheet" href="<?php echo base_url() ?>commons/jquery/themes/base/jquery.ui.all.css">
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.core.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.widget.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.mouse.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.draggable.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.position.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.resizable.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.button.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.dialog.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.effect.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.effect-blind.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.effect-explode.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/jquery.ui.datepicker.js"></script>
<script src="<?php echo base_url() ?>commons/jquery/ui/i18n/jquery.ui.datepicker-es.js"></script>
<link rel="stylesheet" href="<?php echo base_url() ?>commons/jquery/demos/demos.css">
<script>
    var nt1 = jQuery.noConflict();
	nt1(function() {
		nt1( "#fecha" ).datepicker(nt1.datepicker.regional[ "es" ]);
		
	});
	</script>
<script>
    var t = jQuery.noConflict();
    function refrescarTabla() {
        //alert('xxx');
        var idpadre = t('input:radio[name=nro]:checked').val();
        //alert(idpadre);
        
        var fecha = nt1( "#fecha" ).val();
        var res = fecha.split("/");
        fecha = "";
        fecha = res[2]+""+res[1]+""+res[0];
        //rubro
        var id_rubo =  t("#cbx_rubro").val();
        var rubro="";
        var link="";
        if(id_rubo>0){
            rubro = '/'+id_rubo+'/'+t("#cbx_cuota").val();
            link = '<?php echo $link; ?>' + '/' + idpadre+'/'+fecha+rubro;
        }else{
            rubro = '/0/0';
            link = '<?php echo $link; ?>' + '/' + idpadre+'/'+fecha+rubro;
            t("#cbx_cuota").val('1');
        }
        
        
        t.ajax({
            type: 'POST',
            url: '<?php echo base_url(); ?>admin.php/listado_estudiantes_controlador/refrescarTablaCuotaBanco/',
            data: 'link=' + link,
            dataType: 'html',
            success: (function(data) {
                  //alert(data);
                t('#tablamatriculai').html(data);
            }),
            beforeSend: function(objeto) {
                t("#preloader1").show();
            },complete: function(objeto) {
                t("#preloader1").hide();
            }
        });

    }

    t(function() {
        t("input[name=nro]").click(function(event)
        {
            //alert('xxxdf');
            refrescarTabla();

        });
    });
    t(document).ready(function() {
        refrescarTabla();
    });
    t(document).ready(function() {
        t("#cbx_rubro").change(function(event)
        {
            refrescarTabla();
        });
    });  
    t(document).ready(function() {
        t("#cbx_cuota").change(function(event)
        {
            if(t("#cbx_rubro").val()>0){
                
                refrescarTabla();
            }
        });
    }); 
</script>

<div id="preloader1" style="width:800px;height:1200px;position:absolute;z-index:2;background-color:#fff;opacity: 0.85;filter: alpha(opacity = 90);background: linear-gradient(to bottom,  #e4f1f6 0%,#cfe6ef 52%,#7db9e8 100%);text-align:center;box-shadow: 10px 10px 5px #888888;display: none">
    <center>
        <div id="preloaderWrapper1" style="border:1px solid black;border-radius:10px;margin-top:150px; width:350px;height:auto; background: linear-gradient(to bottom,  #1e5799 0%,#2989d8 52%,#7db9e8 100%);text-align:center;box-shadow: 10px 10px 5px #888888;">

            <img src="<?php echo base_url() ?>commons/images/loading_G.gif" width="150" /><br/>
            <!--<img src="<?php echo base_url() ?>commons/images/itss1.jpg" /><br/>-->
            <strong style="font-size: 24px;font-weight: bold;">CARGANDO....</strong> 
        </div>
    </center>
</div>
<form class="well form-horizontal span8" action="<?php echo base_url() . "admin.php/listado_estudiantes_controlador/index" ?>" method="post">
    <legend>LISTADO DE ESTUDIANTES</legend>
    <div class="control-group">
        <table style="border-spacing: 10px; border-collapse: separate;" >
            <tr>
                <td>
                    <label style="font-weight: bold">PERIODO ACADÉMICO:</label>
                </td>
                <td>
                    <label><?php echo $periodo[0]['descripcion_lec']; ?></label>
                </td>
            </tr>
        </table>
    </div>  
    <div class="control-group">
        <table style="border-spacing: 10px; border-collapse: separate;" >
            <tr>
                <td>
                    <label style="font-weight: bold">FECHA:</label>
                </td>
                <td>
                    <input id="fecha" name="fecha" value="<?php echo date("m/d/Y"); ?>"/>
                </td>
            </tr>
        </table>
    </div>
    <div class="control-group">
        <table style="border-spacing: 10px; border-collapse: separate;" >
            <tr>
                <td>
                    <label style="font-weight: bold">RUBROS:</label>
                </td>
                <td>
                    <select id="cbx_rubro">
                        <option value="0">Selecione un rubro</option>
                        <option value="8">Proceso de titulación</option>
                        <?php
                            /*foreach ($listaRubro as $item){
                                echo '<option value="'.$item["ide_rubro"].'">'.$item["nombre_rubro"].'</option>';
                            }*/
                        ?>
                    </select>
                </td>
            </tr>
        </table>
    </div>
    <div class="control-group">
        <table style="border-spacing: 10px; border-collapse: separate;" >
            <tr>
                <td>
                    <label style="font-weight: bold">SELECIONE EL NUMERO DE CUOTA:</label>
                </td>
                <td>
                    <select id="cbx_cuota">
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                    </select>
                </td>
            </tr>
        </table>
    </div>
    <div class="control-group">
        <a class="btn" href="<?php echo base_url()?>admin.php/listado_estudiantes_controlador/mostrarLectivoCuotasBanco" >Volver</a>
    </div>
    <div class="control-group">
        <input name="nro" value="1" type="radio" checked="true"><span>Cuota 1</span></input>
        <input name="nro" value="2" type="radio"><span>Cuota 2</span></input>
        <input name="nro" value="3" type="radio"><span>Cuota 3</span></input>
        <input name="nro" value="4" type="radio"><span>Cuota 4</span></input>
        <input name="nro" value="5" type="radio"><span>Cuota 5</span></input>
        <input name="nro" value="6" type="radio"><span>Cuota 6</span></input>
        <input name="nro" value="7" type="radio"><span>Cuota 7</span></input>
    </div>
    <div id="tablamatriculai" >        
    </div>
</form>